<template>
  <transition name="slide-fade">
    <el-alert
      title="接收到未处理的异常："
      type="error"
      :description="exception.message"
      show-icon
      v-if="exception"
      @close="clearMessage"
    >
    </el-alert>
  </transition>

  <RouterView />
</template>

<script setup>
import { useNotificationStore } from '@/stores/notification.js'
import { computed } from 'vue'

const notification = useNotificationStore()

const exception = computed(() => notification.exception)
const clearMessage = () => notification.clearException()
</script>

<style>
@import url('./assets/css/global.css');

#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}
</style>
